package com.tzbank.common.kafka.listeners;

import com.alibaba.fastjson.JSON;
import com.tzbank.common.kafka.interfaces.GreetingsChannel;
import com.tzbank.kafka.KafkaMethodReq;
import com.tzbank.kafka.MethodAgain;
import com.tzbank.utils.SpringContextUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import org.springframework.util.ReflectionUtils;

import java.util.List;
import java.util.Map;

@Component
@Slf4j
@EnableBinding({GreetingsChannel.class})
public class GreetingsListeners {
    @StreamListener(GreetingsChannel.INPUT)
    public void handleGreetings(KafkaMethodReq kafkaMethodReq){
        MethodAgain.KafkaMethodAgain(kafkaMethodReq);
    }
}
